package com.liuzhilong.infrastructure.basic.factory.statics.factory.auto;

import com.liuzhilong.infrastructure.basic.factory.statics.factory.Product;

public class AutoProduct2 implements Product {
    static {
        System.out.println("我在注册product2");
        AutoFactory.registerProduct("product2",()->{
            AutoProduct2 product2 = new AutoProduct2();
            //dosomelogic
            return product2;
        });
    }
    @Override
    public void doSome() {
        System.out.println("我是产品2");
    }
}
